Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~August Opboosietsi 20.Jan.04 08:01 PM a Web browser
Applications Development 6.0.3 Windows 2000


Hi,

I have a Lotus script that detaches all atachments on a document to a directory on the C:\ Drive.


Sub Click(Source As Button)
'-- Get Front and Backend Document
Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument
Set uidoc = ws.currentdocument

Dim doc As NotesDocument
Set doc = UIDoc.document

'-- Create Session object to access Notes.ini "Directory" value
Dim Session As New NotesSession
Dim dirpath As String
dirpath = session.GetEnvironmentString( "Directory", True )

'-- Loop through all attachments in document and detach to Notes Data Directory
Dim rtitem As Variant
Set rtitem = doc.GetFirstItem( "Body" )

'-- if array of embedded objects exist then detach all attachments into the Notes Data directory
If Isarray( rtitem.EmbeddedObjects ) Then
Forall o In rtitem.EmbeddedObjects
If ( o.Type = EMBED_ATTACHMENT ) Then
fullpath$ = dirpath + "\Quality\" + o.source
Messagebox(fullpath$)
Call o.ExtractFile( fullpath$ )
End If
End Forall
End If
Messagebox(fullpath$)
End Sub

Is there anyway I can have a button to do the reverse? Attach all files within a directory & remove the files from the directory after they have been attached ?

Thanks in advance for your help.

Neil







Attach all files within a directory... (~August Opboosi... 20.Jan.04)
. . Sure... (~Dan Elhipister... 20.Jan.04)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS